#include <cstdio>
#include <cstring>
#define min(x,y) (((x)<(y))?(x):(y))

int x[ 100000 ], y[ 100000 ], z[ 100000 ], n;

void work( )
{
    long long l = 0, r = 0x7fffffff, mid;
    int i;
    long long ret;
    while ( l < r )
    {
        mid = ( l + r ) / 2;
        ret = 0;
        for ( i = 0; i < n; i++ )
            if ( mid >= x[ i ] )
                ret += ( min( mid, y[ i ] ) - x[ i ] ) / z[ i ] + 1;
        if ( ret & 1 )
            r = mid;
        else
            l = mid + 1;
    }
    ret = 0;
    for ( i = 0; i < n; i++ )
        if ( l >= x[ i ] && l <= y[ i ] && ( l - x[ i ] ) % z[ i ] == 0 )
            ret++;
    if ( ret % 2 == 0 )
        puts("no corruption");
    else
        printf("%I64d %I64d\n", l, ret);
}

int main( )
{
    char s[ 100 ];
    bool flag = false;
    n = 0;
    while ( gets( s ) )
    {
        if ( strlen( s ) == 0 )
        {
            if ( !flag ) continue;
            work( );
            n = flag = 0;
        }
        else
        {
            sscanf(s, "%d%d%d", &x[ n ], &y[ n ], &z[ n ]);
            n++;
            flag = true;
        }
    }
    if ( flag ) work( );
    return 0;
}
